package com.scuec.tourismwebsite.service;
import com.github.pagehelper.PageInfo;
import com.scuec.tourismwebsite.entity.User;
import com.scuec.tourismwebsite.vo.UserPost;

import java.util.List;

public interface UserService {
    List<User> findUserAll();
    int deleteUserById(int user_id);
    int addUser(User user);
    User getUserById(int user_id);
    User findUserByPhone(String phone_number);
    List<User> findUserByName(String nickname);
    PageInfo<User> findUserPages(Integer pageNum, Integer pageSize);
    PageInfo<User> findUserPage(String nickname,Integer pageNum, Integer pageSize);
    PageInfo<User> bozhuPages(Integer pageNum, Integer pageSize);
    PageInfo<User> bozhuPage(String nickname, Integer pageNum, Integer pageSize);

    String getPhoneNumberByUserId(String user);


//

    int updateUser(User user);

    void updateUser(int user_id, String avatar);

    List<UserPost> getUserPosts(int userId);
    User loginByPhone(String phone, String password);
    boolean checkUserPassword(int user_id, String password);
    boolean updatePassword(int user_id, String newPassword);
}
